package com.googlecode.vmock.proxy;

import org.objenesis.ObjenesisHelper;

/**
 * Creates objects without calling their respective constructors.
 * <p>
 * Uses Objenesis under the hood.
 * 
 * @author marcin.jagus
 */
final class SilentObjectCreator {

    private SilentObjectCreator() {
    }

    /**
     * Creates an instance of given class without calling any of its constructos.
     * 
     * @param clazz Given class. Cannot be null.
     * @return Instance of a given class
     */
    public static <T> T createSilently(Class<T> clazz) {
        return ObjenesisHelper.newInstance(clazz);
    }
}
